<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>添加学员</title>
<link rel="stylesheet" href="../../easyui/themes/default/easyui.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="../../easyui/themes/icon.css"
	type="text/css" media="screen" />
<link rel="stylesheet" href="../../css/main.css" type="text/css"
	media="screen" />
<link rel="stylesheet" type="text/css" href="../../css/Tooltip.css" />
<link rel="stylesheet" type="text/css" href="css/studentManager.css" />
<script src="../../myjs/student/studentManager.js"></script>
<script src="../../easyui/jquery-1.4.4.min.js"></script>
<script src="../../easyui/jquery.easyui.min.js"></script>
<!-- mytab -->
<script src="../../myjs/myTab.js"></script>
<!-- sys -->
<script src="../../myjs/sys.js"></script>
<script src="../../myjs/DatePicker/WdatePicker.js"></script>
<script src="../../easyui/easyMask.js"></script>
<script src="../../easyui/easyUI.js"></script>
<script src="../../easyui/easyLayer.js"></script>

</head>
<body>
<script>
var greyLayer ;
$(function(){
	grid = $('#tt').datagrid({
		url:'/pxglxt/student/getStudents',
		pagination:true,
		singleSelect:true,
		fit:true,//表格自动填充
		loadMsg:'正在努力为您加载，请稍作等待…',//加载信息
		toolbar:[{
			text:'新增',
			iconCls:'icon-add',
			handler:'newStudent'
		},'-',{
			text:'修改',
			iconCls:'icon-edit',
			handler:'editStudent'
			
		},'-',{
			text:'删除',
			iconCls:'icon-remove',
			handler:'delStudent'
		}]
	});
	//初始化pagination工具开始
	var pagetool = $('#tt').datagrid('getPager');
	pagetool.pagination({				
			beforePageText:'第',
			afterPageText:'页，共{pages}页',
			displayMsg:'显示从 {from} 到  {to} , 总记录 {total} '});
	//初始化pagination工具结束
	$('body').layout();
	$('#btn-save,#btn-cancel').linkbutton();
	win = $('#user-window').window({
		collapsible:false,
		minimizable:false, 
		maximizable:true, 
		closable:true,
		onClose:function(){greyLayer.close();},
		closed:true
	});
	form = win.find('form');
	greyLayer = new easyMask(null,'100%','100%',100,'#000',8,true);
});
</script>
<div region="center" fit="true" style="padding: 5px;">
<table id="tt">
	<thead>
		<tr>
			<th field="unit_id" width="100%">校区</th>
			<th field="media_id" width="100%">获知广告方式</th>
			<th field="sales_name" width="100%">销售顾问</th>
			<th field="stu_name" width="100%">学员姓名</th>
			<th field="stu_sex" width="100%">性别</th>
			<th field="stu_sfzh" width="100%">身份证号</th>
			<th field="stu_birthday" width="100%">生日</th>
			<th field="stu_mobile" width="150%">联系方式</th>
			<th field="stu_email" width="100%">Emial</th>
			<th field="stu_photo" width="100%">头像</th>
			<th field="stu_school" width="100%">就读学校</th>
			<th field="stu_grade" width="100%">就读年级</th>
			<th field="stu_mother_phone" width="100%">妈妈电话</th>
			<th field="stu_father_phone" width="100%">爸爸电话</th>
			<th field="stu_ic_no" width="100%">IC卡号</th>
			<th field="stu_regist_time" width="100%">报名时间</th>
			<th field="stu_desc" width="100%">备注</th>
			<th field="user_enter" width="100%">录入员</th>
		</tr>
	</thead>
</table>
</div>
<div id="user-window" title="学员管理窗口"
	style="width: 800px; height: 450px;">
<form method="post">
<table border="1" cellpadding="1" cellspacing="1" bordercolor="#E7E7E7">
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>校区 </strong></td>
		<td align="left"><input class="easyui-combobox" name="unit_id"
			url="/pxglxt/department/getUnits" valueField="unit_name"
			textField="unit_name" multiple="false" panelHeight="auto"
			style="width: 220px" required="true"></input></td>
		<td align="center" bgcolor="#F6F6F6"><strong>报名时间 </strong></td>
		<td align="left"><input type="text" class="Wdate" size="32"
			name="stu_regist_time" id="stu_regist_time" value="" maxlength="10"
			onClick=WdatePicker();></input></td>
		<td rowspan="4" align="center"><img width="120px" height="118px"
			src="msn.gif" ondblclick=""></img><input type="hidden"
			name="stu_photo" id="stu_photo" value="images/msn.gif"></input></td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>获知广告方式 </strong></td>
		<td align="left"><input class="easyui-combobox" name="media_id"
			url="/pxglxt/dic_knowfrom/getDicsForComb" valueField="dicvalue"
			textField="dicvalue" multiple="false" panelHeight="auto"
			required="true"></input></td>
		<td align="center" bgcolor="#F6F6F6"><strong>销售顾问 </strong></td>
		<td align="left"><input class="easyui-combobox" name="sales_id"
			url="/pxglxt/student/getLabours" valueField="id"
			textField="real_name" multiple="false" panelHeight="auto"
			style="width: 220px" required="true"></input></td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>学员姓名 </strong></td>
		<td align="left"><input type="text" name="stu_name" id="stu_name"
			value="" maxlength="100" class="easyui-validatebox" required="true"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></td>
		<td align="center" bgcolor="#F6F6F6"><strong>性别 </strong></td>
		<td align="left"><input class="easyui-combobox" name="stu_sex"
			url="sex.json" valueField="text" textField="text" multiple="false"
			panelHeight="auto" required="false"></input></td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>身份证号 </strong></td>
		<td align="left"><input type="text" name="stu_sfzh" id="stu_sfzh"
			value="" maxlength="50" class="easyui-validatebox"	required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></td>
		<td align="center" bgcolor="#F6F6F6"><strong>生日 </strong></td>
		<td align="left"><input type="text" class="Wdate" size="32"
			name="stu_birthday" id="stu_birthday" value="" maxlength="10"
			onClick=WdatePicker();></td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>联系方式 </strong></td>
		<td align="left"><input type="text" name="stu_mobile"
			id="stu_mobile" value="" maxlength="100"
			class="easyui-

validatebox" required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></td>
		<td align="center" bgcolor="#F6F6F6"><strong>Email</strong></td>
		<td colspan="2" align="left"><input type="text" name="stu_email"
			id="stu_email" value="" maxlength="100" class="easyui-validatebox"
			required="false" validType="email"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>就读学校 </strong></td>
		<td align="left"><input type="text" name="stu_school"
			id="stu_school" value="" maxlength="100"
			class="easyui-

validatebox" required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></td>
		<td align="center" bgcolor="#F6F6F6"><strong>就读年级 </strong></td>
		<td colspan="2" align="left"><input class="easyui-combobox"
			name="stu_grade" url="/pxglxt/dic_purposegrade/getDicsForComb"
			valueField="dicvalue" textField="dicvalue" multiple="false"
			panelHeight="auto" required="false"></input></td>
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>妈妈电话 </strong></td>
		<td align="left"><input type="text" name="stu_mother_phone"
			id="stu_mother_phone" value="" maxlength="100"
			class="easyui-validatebox" required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></input></td>
		<td align="center" bgcolor="#F6F6F6"><strong>爸爸电话 </strong></td>
		<td colspan="2" align="left"><input type="text"
			name="stu_father_phone" id="stu_father_phone" value=""
			maxlength="100" class="easyui-validatebox" required="false"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></td>
		<!-- disabled="disabled" -->
	</tr>
	<tr align="center" valign="middle">
		<td align="center" bgcolor="#F6F6F6"><strong>IC卡号 </strong></td>
		<td colspan="4" align="left"><input type="text" size="32"
			name="stu_ic_no" id="stu_ic_no" value="" maxlength="100"
			class="easyui-validatebox" required="true"
			style="width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></td>
	</tr>
	<tr align="center" valign="middle">
	<td align="center" bgcolor="#F6F6F6"><strong>录入员 </strong></td>
		<td align="left"><input class="easyui-combobox"
			name="user_enter_id" url="/pxglxt/student/getLabours" valueField="id"
			textField="real_name" multiple="false" panelHeight="auto"
			style="width: 220px" required="true"></input></td>
		<td align="center" bgcolor="#F6F6F6"><strong>备注 </strong></td>
		<td colspan="2" align="left"><textarea name="stu_desc"
			id="stu_desc" class="easyui-validatebox" required="false"
			style="height: 100px; width: 198px; padding: 3px 5px; border: solid 1px #B8BFE9;"></textarea></td>
		<!-- 

disabled="disabled" -->
	</tr>
	
</table>

</form>

<div style="text-align: center; padding: 5px;"><a
	href="javascript:void(0)" onclick="saveStudent()" id="btn-save"
	icon="icon-save">确定</a> <a href="javascript:void(0)"
	onclick="closeWindow()" id="btn-cancel" icon="icon-cancel">取消</a></div>
</div>
</body>
</html>
